<template>

  <component :is="componentId" :mod="model" @jumpCom="jumpCom" :item='item'></component>

</template>
<script setup>
import store from '@/store'
import { shallowRef, reactive } from 'vue'
import Form from './form.vue'

const componentId = shallowRef(null)
const item = reactive({ data: {} })
const jumpCom = (obj) => {
  item.data = obj.item ? obj.item : {}
  componentId.value = obj.to
}
const model = store.state.modInfo
if (store.state.modInfo.type == 'form') {
  componentId.value = Form
}
</script>